﻿package no.doomsday.aronning.engines.verlets.utils 
{
	
	/**
	 * ...
	 * @author Andreas Rønning
	 */
	public class LinkedListNode 
	{
		
		public var previous:LinkedListNode;
		public var next:LinkedListNode;
		public function LinkedListNode() 
		{
			
		}
		public function destroy():void {
			
			try{
				next.previous = previous;
			}catch (e:Error) { 
				trace("couldnt set next.prev");
			};
			try{
				previous.next = next;
			}catch (e:Error) { 
				trace("couldnt set prev.next");
			};
			
		}
		public function append(n:LinkedListNode):void {
			try{
				next.previous = n;
				n.next = next;
				n.previous = this;
			}catch (e:Error) { };
			next = n;
		}
		public function moveUp():void {

		}
		public function moveDown():void {
			
		}
		
	}
	
}